<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                            <i class="fa  fa-fw fa-reorder"></i>添加权限路径
                        </li>
                    </ol>
                </div>
            </div>
            <div id="page-wrapper">
                <div class="container-fluid col-md-7 col-sx-12">
                    <form action="/admin_controller/add" method="post" enctype="multipart/form-data" >
                        <div class="form-group">
                            <label for="name">控制器名称</label>
                            <input type="text" placeholder="控制器别名" id="name" class="form-control" name="name" />
                        </div>
                        <div class="form-group">
                            <label for="url">控制器路径</label>
                            <input type="text" placeholder="控制器路径" id="url" class="form-control" name="url" />
                        </div>
                        <div class="form-group">
                            <label for="status">控制器状态&nbsp;&nbsp;&nbsp;&nbsp;</label>
                            <input type="radio" id="active" name="status" value="1" checked/><label for="active">&nbsp;正常&nbsp;&nbsp;&nbsp;&nbsp;</label>
                            <input type="radio" id="dective" name="status" value="0"/><label for="dective">&nbsp;禁用&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        </div>
                        <button class="btn btn-primary demo_2" type="button" id="submit">添加</button>
                    </form>   
                </div>
                <div class="subviews">
                    <div class="subviews-container"></div>
                </div>
            </div>
            <!-- end: PAGE -->
        </div>
    </div>
</div>
<!-- end: MAIN CONTAINER -->


<script>
$(function(){
    var options={
        beforeSubmit : showRequest,    // 提交前的回调函数
        success : showResponse,    // 提交后的回调函数
        dataType : "json",    // html（默认）、xml、script、json接受服务器端返回的类型
        //timeout : 3000    // 限制请求的时间，当请求大于3秒后，跳出请求
    }
    function showRequest(formData, jqForm, options){
        return true;
    }
    function showResponse(responseText,statusText){
        cg_alert_add(responseText,'/admin_controller','/admin_controller/add');
    }
    $('#submit').click(function() {
        $('form').ajaxSubmit(options);
        return false;

    });
});
</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
